package org.sonar.plugin.deltacoverage;

import java.util.Arrays;
import java.util.List;

import org.sonar.api.Plugin;
import org.sonar.api.Properties;
import org.sonar.api.Property;


@Properties(
	    @Property(key="sonar.deltacoverage.reportPath", name="Delta coverage report path", description = "Path of DeltaCoverageReport.xml")
	    )

/**
 * This class is the entry point for all extensions
 */
public class DeltaCoveragePlugin implements Plugin {

	public static final String PLUGIN_KEY = "DeltaCoverage";
	public static final String REPORT_PATH_KEY = "sonar.deltacoverage.reportPath";

	/**
	 * @deprecated this is not used anymore
	 */
	public String getKey() {
		return PLUGIN_KEY;
	}

	/**
	 * @deprecated this is not used anymore
	 */
	public String getName() {
		return PLUGIN_KEY;
	}

	/**
	 * @deprecated this is not used anymore
	 */
	public String getDescription() {
		return "Delta coverage plugin is used to find code coverage only for code changed since a specific version. This can enable tracking of code coverage for specific set of changes, like all the code changed since previous release.";
	}

	// This is where you're going to declare all your Sonar extensions
	public List getExtensions() {
		return Arrays.asList(DeltaCoverageDecorator.class, DeltaCoverageMetrics.class, DeltaCoverageWidget.class);
	}

	@Override
	public String toString() {
		return getClass().getSimpleName();
	}
}
